package com.mechat.common.websocket.service;

import com.mechat.common.websocket.domain.vo.resp.WSBaseResp;
import io.netty.channel.Channel;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.mp.bean.device.BaseResp;

public interface WebSocketService {
    void connect(Channel channel);

    void handleLoginReq(Channel channel) throws WxErrorException;

    // 用户下线统一处理
    void remove(Channel channel);

    // 通过code找到channel，进行登录
    void scanLoginSuccess(Integer code, Long uid);

    // 推送链接让用户授权
    void waitAuthorize(Integer loginCode);

    // 登录校验
    void authorize(Channel channel, String token);

    // 发送消息
    void sendMsgToAll(WSBaseResp<?> msg);
}
